const fs = require('fs');
const path = require('path');

function copySslFiles() {
    const srcSslPath = path.join(__dirname, '..', 'src', 'ssl');
    const distSslPath = path.join(__dirname, '..', 'dist', 'ssl');
    
    if (fs.existsSync(srcSslPath)) {
        if (!fs.existsSync(distSslPath)) {
            fs.mkdirSync(distSslPath, { recursive: true });
        }
        
        const items = fs.readdirSync(srcSslPath);
        for (const item of items) {
            const srcItem = path.join(srcSslPath, item);
            const destItem = path.join(distSslPath, item);
            fs.copyFileSync(srcItem, destItem);
            console.log(`🔒 复制 SSL: ${item}`);
        }
        console.log('✅ SSL 文件复制完成');
    } else {
        console.log('📁 SSL 目录不存在，跳过复制');
    }
}

copySslFiles(); 